package com.hlx.mall.member.controller;

import com.hlx.mall.member.domain.MemberCopon;
import com.hlx.mall.member.domain.SmsCoupon;
import com.hlx.mall.member.feign.CouponFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController     
@RequestMapping("/member/member")
public class MemberController {
    
    @Resource
    CouponFeignService couponFeignService;
    
    @GetMapping("/coupons")
    public MemberCopon test() {
        MemberCopon memberCopon = new MemberCopon();
        memberCopon.setNickname("张三");

        SmsCoupon res = couponFeignService.test();
        memberCopon.setSmsCoupon(res);
        return memberCopon;
    }
}
